<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>2</cardCount>
<cardID>4561</cardID>
<listID>2626</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>Stack "InfoMac Digest 1991" © 1991 Peter Jörgensenon NewCardset the cantdelete of this cd to truepass newCardend newCard-- The next three handlers (idle, GetNextSubj, openCard) work together-- to speed up the action of the "S" button. When you click on the "S"-- button the field scrolls instantly to the next subject because these-- handlers have already calculated it's position in the field.on idleglobal theScroll,nextSubjif the scroll of fld "text" > theScroll thenput GetNextSubj() into nextSubjput the scroll of fld "text" into theScrollend ifpass idleend idlefunction GetNextSubjput (the scroll of fld "text" div the textHeight of fld "text") + 4 into lrepeat with l = l + 1 to the number of lines in fld "text"set the cursor to busyif word 1 of line l of fld "Text" is "Subject:" then exit repeatend repeatreturn lend GetNextSubjon opencardif the commandkey is down then pass opencardglobal nextSubj,theScrollput 0 into theScrollput empty into nextSubjput GetNextSubj() into nextSubjModifyTopicsMenuend opencardon ModifyTopicsMenuget fld "volume/issue"if it contains " pt " and the last word of it is not "1" then exit modifyTopicsMenuunlock screenif the short name of this cd contains "Help" then exit ModifyTopicsMenuif there is not a menu "Topics" then exit ModifyTopicsMenuif fld "Topics" is not empty thenrepeat with i = 3 to the number of lines in fld "Topics" - 2set the cursor to busyput char 1 to 30 of line i of fld "Topics" into item i-2 of theTopicsend repeatput theTopics into menu "Topics"end ifend ModifyTopicsMenuon discardold-- a utility command entered via the messagebox to delete old issuesgo cd 3set the lockmessages to trueget the long dateput char 1 to 3 of word 1 of item 2 of it into thisMonthrepeatset the cursor to busyif not (fld "volume/issue" contains thisMonth) then exit repeatgo nextend repeatrepeat for the number of cards - the number of this cddoMenu "Delete Card"end repeatbeepend discardoldon Topicfind aStringfind string aString in fld 5if the result is empty then find string aString in fld 2end topicFindfunction ParseLine aLine,someText-- determines whether a line contains a notice that a posting was-- archived.get line aLine of someTextput empty into theDirif not (it contains "info-Mac/") then return "Not an archive."if it contains "Archived as" then delete char 1 to (offset("info-mac/",it)) of itrepeatdelete char 1 to (offset("/",it)) of itif not (it contains "/") then put "Unspecified/" before itif theDir is empty then put char 1 to (offset("/",it)-1) of it into¬theDir -- parse the directory for this filedelete char 1 to (offset("/",it)) of it -- delete the dir nameif last char of it is "]" thendelete last char of itput it && word 4 to 6 of fld "volume/issue"& return after theStringexit repeatend ifput it && word 4 to 6 of fld "volume/issue"& return after theStringadd 1 to aLineget line aLine of someTextif offset("/",it) = 0 then exit repeatend repeatreturn LowerToUpper(theDir&&theString)end ParseLineon AddArchives-- This handler is for adding items in an issue to the archive stack-- Items are normally added as the issue is imported.repeat with ln = (fld "NumTopics" +6) to the number of lines in fld "text"set the cursor to busyget ParseLine (ln)if it is "Not an archive." then next repeatrepeat 3delete last word of it -- incorrect date from parselineend repeatdelete last char of it -- the return that parseline addedput wd 2 to 4 of fld "volume/issue" & return after itAddToArchive itend repeatend AddArchiveson AddToArchive anArchive-- Adds an archive of the form directory/file.ext to the appropriate-- card in the archive stack, creating a new directory card if necessary.set the cursor to watchset the lockscreen to trueset the lockmessages to trueset the lockrecent to truepush cardgo cd (word 1 of anArchive) of stack "MacArchives"if the result is not empty thengo last cd of stack "MacArchives"domenu "New Card"set the name of this cd to word 1 of anArchiveput word 1 of anArchive into fld 1end ifput false into ALineWasAddedrepeat with ln = 1 to the number of lines in anArchivedelete word 1 of line ln of AnArchive -- the directory nameif line ln of anArchive is not in fld "text" thenput return & line ln of anArchive after fld "text"put "true" into ALineWasAddedelsebeepput "Already in Archive."end ifend repeatif ALineWasAdded thensort fld "text"end ifpop cardset the lockscreen to falseset the lockmessages to falseset the lockrecent to falseend AddToArchiveon SaveList-- Saves your list of files to request from the archiveglobal theFilesif theFiles is not empty thenAnswer "Save list of archive files to get?" with "No" or "Yes"if it is "Yes" thenAsk file "Save file list as..." with "GetThese.txt"if it is empty then exit SaveListput it into theFileopen file theFileread from file theFile for 30000 -- to the end of file.write theFiles to file theFileclose file theFileput empty into theFilesend ifend ifend SaveListon CloseStackglobal theMessageSaveListput the message into theMessageif there is a menu "Topics" then delete menu "Topics"pass closeStackend closeStackon OpenStackglobal theMessageif theMessage is not empty thenput theMessagehide message boxend ifif the icon of bg btn "Anchor" is not 15143 then send mouseUp to bg btn "Anchor"if there is not a menu "Topics" then Create Menu "Topics"pass openStackend openstackon clonestack-- set the lockscreen to trueset the lockmessages to truepush cardCreate stack "New Digest" with this backgroundpop card -- cd 1repeat 2 -- first 2 cardsdoMenu "Copy Card"push cardgo last cd of stack "New Digest"doMenu "Paste Card"pop cardgo nextend repeat-- now copy card 3doMenu "Copy Card"push cardgo last cd of stack "New Digest"doMenu "Paste Card"pop card-- now skip the bad card - card 4go cd 5-- now copy the rest of the cards until we're back to card 1repeat until the number of this cd is 1put the number of this cddoMenu "Copy Card"push cardgo last cd of stack "New Digest"doMenu "Paste Card"pop cardgo nextend repeat-- finally, delete the original first card of the new stackgo cd 1 of stack "New Digest"set the cantdelete of this cd to falsedoMenu "Cut Card"beepend clonestack</script>